package com.daybook.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.daybook.mapper.AdminMapper;
import com.daybook.pojo.Admin;
import com.daybook.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService {
	@Autowired
	private AdminMapper adminMapper;

	@Override
	/**
	 * 管理员登录验证
	 */
	public Admin selectByNameAndPwd(Admin record) {
		return adminMapper.selectByNameAndPwd(record);
	}
	//修改密码
	public int updateAdminByPwd(String apwd,String aname){
		int result=-1;
		result=adminMapper.updateAdminPwd(apwd, aname);
		return result;
	}
}
